package com.dou.you.che.comm.utils.validator;

import com.dou.you.che.comm.utils.exception.WebException;
import org.apache.commons.lang.StringUtils;

/**
 * 数据校验
 * @Author 黄国刚【1058118328@qq.com】
 */
public class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new WebException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new WebException(message);
        }
    }
}
